<template>
    <view class="group-btn" @tap="toGroup" v-if="conf.joinGroupButtonShow == 1">
        关注
    </view>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
    computed: {
        ...mapGetters(['conf'])
    },

    methods: {
        toGroup() {
            this.$service.wxjlj
                .getConfig()
                .then(res => {
                    let url = res.joinGroupQRCode;
                    uni.navigateTo({
                        url: '/pages/h5/index?url=' + url
                    });
                })
                .catch(err => {
                    uni.showToast({
                        title: err,
                        icon: 'none'
                    });
                });
        }
    }
};
</script>

<style lang="scss" scoped>
.group-btn {
    position: fixed;
    right: 30rpx;
    bottom: 460rpx;
    height: 80rpx;
    width: 80rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    border-radius: 80rpx;
    border: 1rpx solid #eee;
    box-sizing: border-box;
}
</style>
